<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-lr-10">


<form name="myform" action="?m=admin&c=admin_manager&a=secadmin" method="post">
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
   		<tr>
			<th  align="left" width="20"><?php if($muti){?><input type="checkbox" value="" id="check_box" onclick="selectall('admin_id[]');"><?php } ?></th>
			<th align="left">姓名</th>
			<th align="left">E-mail</th>
			<th align="left">手机</th>
		  </tr>
	</thead>
<tbody>
<?php
$newlist = array();
	if(is_array($adminlist)){
	foreach($adminlist as $k=>$v) {
		
		//$data = json_encode($v);//echo 'ccc';
		//echo htmlspecialchars("'aaa'",ENT_QUOTES);
		//$data = str_replace('\'','&#039;',$data);
		/*//onClick='setData(<?=$data;?>);'
        // onClick='setData(<?=$data;?>);'*/
		$newlist[$v['userid']] = $v;
?>
    <tr>
		<td align="left"><?php if($muti){?><input type="checkbox" class="adminchb" value="<?=$v['userid']?>" name="admin_id[]"><?php }else{?><input type="radio" class="adminchb" value="<?=$v['userid']?>" name="admin_id[]"><?php } ?></td>
        <td align="left"><?=$v['realname'];?></td>
		<td align="left"><?=$v['email'];?></td>
		<td align="left"><?=$v['mobile']; ?></td>
		</tr>
<?php
	}
}
?>
</tbody>
</table>



<div id="pages"><?=$pages?></div>
</div>
</form>
</div>
<script type="text/javascript">
<!--
var secadms = <?php echo json_encode($newlist);?>;
function selected()
{
	if($('.adminchb:checked').length<1){
		window.top.art.dialog({content:'请选择',lock:true,width:'200',height:'50',time:1.5},function(){});
		return false;
	}
	
	var  secadm = [];
	try{
		$('.adminchb:checked').each(function(index, element) {
			secadm.push(secadms[$(element).val()]);
		});
	}catch(ex)
	{
		
	}
	window.top.right.setAdmin(secadm);
	//window.parent.$('#rightMain').data.frame.setStaff(staff);
}


//-->
</script>
</body>
</html>